import 'audio_spectrum_method_channel.dart';
import 'audio_spectrum_platform_interface.dart';

class AudioSpectrum {
  getAudioSpectrum(String url) {
    AudioSpectrumPlatform.instance.getAudioSpectrum(url);
  }

  listenMusicSpectrum(EventHandler onEvent, EventHandler onError) {
    AudioSpectrumPlatform.instance.listenMusicSpectrum(onEvent, onError);
  }

  listenRecordSpectrum(EventHandler onEvent, EventHandler onError) {
    AudioSpectrumPlatform.instance.listenRecordSpectrum(onEvent, onError);
  }

  stopPlayer() {
    AudioSpectrumPlatform.instance.stopPlayer();
  }

  startRecord() {
    AudioSpectrumPlatform.instance.startRecord();
  }

  stopRecord() {
    AudioSpectrumPlatform.instance.stopRecord();
  }
}
